

import os
def recu(f):
    if os.path.isdir(f)==False:
        return
    try:
        b=os.listdir(f)
        for x in b:
            x=os.path.join(f,x)#连接两个路径
            print(x)
            if os.path.isdir(x):
                recu(x)
    except:
        pass

if __name__ == '__main__':
    a=input("请输入文件夹名")
    recu(a)